package com.itzmn.java.javase.jvm.javamemory;

import java.util.ArrayList;

/**
 * @Author: 张梦楠
 * @Date: 2018/12/12 15:20
 * 简书：https://www.jianshu.com/u/d611be10d1a6
 * 码云：https://gitee.com/zhangqiye
 * @Description:
 *  虚拟机参数：-Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 */
public class HeapOutOfMemeoryError {

    static class OOM{

    }
    public static void main(String[] args) {
        ArrayList<OOM> ooms = new ArrayList<>();
        for (;;){
            ooms.add(new OOM());
        }
    }

}
